﻿@{
    Layout = null;
}

<!DOCTYPE html>

<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <title>账户</title>
    @Html.Partial("wap/team/commonMeta")
    <link rel="stylesheet" href="~/css/wap/team/product.css?v=@MvcWechat.Common.Version.Get" />
    <link href="~/Css/wap/team/stock.css?v=@MvcWechat.Common.Version.Get" rel="stylesheet" />
    <link href="~/Css/wap/team/teamorder.css?v=@MvcWechat.Common.Version.Get" rel="stylesheet"/>
</head>
<body>
<div class="views">
    <div class="view view-main">
        <div class="navbar">
            <div class="navbar-inner">
                <header id="common_header">
                    <div class="menu_icon_box" id="show_menu_btn">
                        <em class="menu-btn"></em>
                    </div>
                    <div class="menu_icon_box" id="hide_menu_btn">
                        <em class="colse-nav-btn"></em>
                    </div>
                    <h2>账户</h2>
                </header>
                @Html.Partial("wap/team/teammenu")
                <div class="subnavbar" style="display: block;padding: 0;height:auto;background-color: #fff;padding-top: 5px;">
                    <div>
                        <ul class="clearfix" id="navMenu">
                            <li><a data-href="/wap/team/flow" href="#">流水</a></li>
                            <li><a data-href="/wap/team/bank" href="#" class="active">账户</a></li>
                        </ul>
                    </div>
                    <div class="list_status clearfix" id="_sysStatus">
                        <span id="show_term_btn" class="add_blue">筛选</span>
                        <span class="account_applyfor"><a href="#" class="add" id="_apply" title="申请收支">申请</a></span>
                        <span class="account_add"><a href="#" class="add" id="_add" title="添加账户">添加</a></span>
                    </div>

                    <table class="product_table" id="product_table_fixed" style="padding-top: 3px;">
                        <thead>
                        <tr>
                            <th style='width:8%'>序号</th>
                            <th class='nickname' style='width:15%'>银行</th>
                            <th style='width:12%'>账号</th>
                            <th style='width:12%'>结余<i class="sort sort_normal" data-sort="BankBalance"></i></th>
                            <th style='width:10%'>结余对账<i class="sort sort_normal" data-sort="UpdateTime"></i></th>
                            <th style='width:10%'>对账人</th>
                            <th style='width:10%'>状态</th>
                            <th style='width:10%'>类型</th>
                            <th style='width:13%'>操作</th>
                        </tr>
                        </thead>

                        <tbody id="stock_body_hide">

                        </tbody>
                    </table>
                </div>
            </div>
        </div>
        <div class="pages navbar-through toolbar-through">
            <div data-page="index" class="page">
                <!--内容区start-->
                <div class="page-content" id="app_no_header">
                    <!-- 库存列表start -->
                    <div id="inventory" style="background-color: #fff;">
                        <table class="product_table table_hide" id="product_table">
                            <thead>
                            <tr>
                                <th style='width:8%'>序号</th>
                                <th class='nickname' style='width:15%'>银行</th>
                                <th style='width:12%'>账号</th>
                                <th style='width:12%'>结余<i class="sort sort_normal" data-sort="BankBalance"></i></th>
                                <th style='width:10%'>结余对账<i class="sort sort_normal" data-sort="UpdateTime"></i></th>
                                <th style='width:10%'>对账人</th>
                                <th style='width:10%'>状态</th>
                                <th style='width:10%'>类型</th>
                                <th style='width:13%'>操作</th>
                            </tr>

                            </thead>
                            <tbody id="stock_body">

                            </tbody>
                        </table>
                    </div>
                </div>
                <!--内容区end-->
            </div>
        </div>

        <!--弹出框start-->

        <!--筛选start-->
        <div class="popup user_filter_box">
            <div class="pop">
                <span class="colse_popbox close-popup">X</span>
                <h5>账户筛选</h5>
                <form class="form-finance-filtrate">
                    <div class="form-group">
                        <label>客户名字：</label>
                        <input class="form-control" type="text" placeholder="开户银行" id="_name" />
                    </div>
                    <div class="form-group">
                        <label>客户名字：</label>
                        <input class="form-control" type="text" placeholder="银行账号" id="_account" />
                    </div>
                    <div class="form-group">
                        <label>客户名字：</label>
                        <select class="form-control list_search" id="_checkresult">
                            <option value="">对账</option>
                            <option value="1">相符</option>
                            <option value="0">不符</option>
                            <option value="">未对账</option>
                        </select>
                    </div>
                    <div class="form-group">
                        <label>客户名字：</label>
                        <select class="form-control list_search" id="sel_currency">
                            <option value="">币种</option>
                            <option value="1" class="CurrentRMB">人民币</option>
                            <option value="2" class="CurrentUSD">美金</option>
                        </select>
                    </div>
                    <div class="form-group">
                        <label>客户名字：</label>
                        <select class="form-control list_search" id="_status">
                            <option value="">状态</option>
                            <option value="1" selected="selected">启用</option>
                            <option value="0">禁用</option>
                        </select>
                    </div>
                    <div class="form-time form-time-two">
                        <label>对账时间：</label>
                        <div class="list-block" style="margin: 0;">
                            <ul>
                                <li>
                                    <div class="item-content" style="padding-left: 0;">
                                        <div class="item-inner">
                                            <div class="item-input">
                                                <input type="text" class="date_input time_input" name="DeliveryTime" placeholder="对账时间" readonly id="schecktime" required="required">
                                            </div>
                                        </div>
                                    </div>
                                </li>
                            </ul>
                        </div>
                        <span>至</span>
                        <div class="list-block" style="margin: 0;">
                            <ul>
                                <li>
                                    <div class="item-content" style="padding-left: 0;">
                                        <div class="item-inner">
                                            <div class="item-input">
                                                <input type="text" class="date_input time_input" name="DeliveryTime" placeholder="审核时间" readonly id="echecktime" required="required">
                                            </div>
                                        </div>
                                    </div>
                                </li>
                            </ul>
                        </div>
                    </div>
                    <div class="form-time form-time-two">
                        <label>加入时间：</label>
                        <div class="list-block" style="margin: 0;">
                            <ul>
                                <li>
                                    <div class="item-content" style="padding-left: 0;">
                                        <div class="item-inner">
                                            <div class="item-input">
                                                <input type="text" class="date_input time_input" name="DeliveryTime" placeholder="加入时间" readonly id="screatetime" required="required">
                                            </div>
                                        </div>
                                    </div>
                                </li>
                            </ul>
                        </div>
                        <span>至</span>
                        <div class="list-block" style="margin: 0;">
                            <ul>
                                <li>
                                    <div class="item-content" style="padding-left: 0;">
                                        <div class="item-inner">
                                            <div class="item-input">
                                                <input type="text" class="date_input time_input" name="DeliveryTime" placeholder="审核时间" readonly id="ecreatetime" required="required">
                                            </div>
                                        </div>
                                    </div>
                                </li>
                            </ul>
                        </div>
                    </div>
                    <div class="confirm">
                        <input type="reset" class="btn btn-danger supbtn" value="重置"/>
                        <input type="button" class="btn btn-danger supbtn" id="confirm_btn"  value="确定"/>
                    </div>
                </form>
            </div>
        </div>
        <!--筛选end-->

        <!-- 申请收支start -->
        <div class="popup applyflow_pop_box">
            <div class="pop">
                <span class="colse_popbox close-popup">X</span>
                <h5>申请收支</h5>
                <form class="form-inline _addflow" style="padding: 5px 5px 5px 30px;" action="post">

                    <div class="in-line">
                        <label style="vertical-align: top;"><b style="color:red;font-weight:bold;">*</b>账户：</label>
                        <div class="account-radio" id="_bankID1"></div>
                    </div>

                    <div class="form-group">
                        <label for="Abstract">操作：</label>
                        <label for="sq"><input type="radio" name="Abstract" value="8" id="sq" checked="checked" />申请&nbsp;</label>
                    </div>
                    <div class="form-group">
                        <label for="Type"><b style="color:red;font-weight:bold;">*</b>收支：</label>
                        <label for="zc" style="width: auto;"><input type="radio" name="Type" value="2" id="zc" checked="checked" />支出 -&nbsp;</label>
                        <label for="sr" style="width: auto;"><input type="radio" name="Type" value="1" id="sr"/>收入 +&nbsp;</label>
                    </div>
                    <div class="form-group">
                        <label for="Amount"><b style="color:red;font-weight:bold;">*</b>交易金额：</label>
                        <input type="number" class="form-control" id="amount" placeholder="交易金额" name="Amount">
                    </div>
                    <div class="form-group">
                        <label for="Currency">币种：</label>
                        <select class="form-control" name="Currency" id="apply_currency">
                            <option value="1" class="CurrentRMB">人民币</option>
                            <option value="2" class="CurrentUSD">美元</option>
                        </select>
                    </div>
                    <div class="form-group">
                        <label for="ArrivalTime"><b style="color:red;font-weight:bold;">*</b>到款：</label>
                        <div class="list-block" style="margin: 0; width: 70%;">
                            <ul>
                                <li>
                                    <div class="item-content" style="padding-left: 0;">
                                        <div class="item-inner">
                                            <div class="item-input">
                                                <input type="text" class="date_input time_input" name="ArrivalTime" placeholder="到款日期" readonly id="arrivalTime" required="required">
                                            </div>
                                        </div>
                                    </div>
                                </li>
                            </ul>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="Purpose">用途：</label>
                        <select class="form-control" name="Purpose" id="purpose">
                            <option value="1">裸钻</option>
                            <option value="2">换美金</option>
                            <option value="3">杂项</option>
                            <option value="4">借款</option>
                            <option value="5">还款</option>
                        </select>
                    </div>
                    <div class="form-group">
                        <label for="Others">人物：</label>
                        <input type="text" class="form-control" id="others" placeholder="人物" name="Others">
                    </div>
                    <div class="form-group">
                        <label for="Status">状态：</label>
                        <select class="form-control" name="Status" id="status" disabled="disabled">
                            <option value="1">已审核</option> <!-- 1已审核 -1已作废 -->
                        </select>
                    </div>
                    <div class="remarks-group">
                        <label for="Remarks"><b style="color:red;font-weight:bold;">*</b>备注：</label>
                        <textarea id="remarks" name="Remarks" placeholder="申请备注" class="form-text" cols="65"></textarea>
                    </div>
                    <div class="confirm">
                        <input type="reset" class="btn btn-danger supbtn" value="重置"  />
                        <input type="submit" class="btn btn-danger supbtn" value="确定"/>
                    </div>
                </form>
            </div>
        </div>
        <!-- 申请收支end -->

        <!-- 添加账户start -->
        <div class="popup add_pop_box">
            <div class="pop">
                <span class="colse_popbox close-popup">X</span>
                <h5>添加账户</h5>
                <form class="form-inline _add" style="padding: 5px 5px 5px 30px;" action="post">
                    <div class="form-group">
                        <label for="BankName"><b style="color:red;font-weight:bold;">*</b>银行：</label>
                        <input type="text" class="form-control" id="bankName" placeholder="银行" name="BankName">
                    </div>
                    <div class="form-group">
                        <label for="BankAccount"><b style="color:red;font-weight:bold;">*</b>账号：</label>
                        <input type="text" class="form-control" id="bankAccount" placeholder="账号" name="BankAccount">
                    </div>
                    <div class="form-group">
                        <label for="Currency"><b style="color:red;font-weight:bold;">*</b>币种：</label>
                        <select name="Currency" class="form-control" id="currency">
                            <option value="">币种</option>
                            <option value="1" class="CurrentRMB">人民币</option>
                            <option value="2" class="CurrentUSD">美金</option>
                        </select>
                    </div>
                    <div class="form-group">
                        <label for="BankBalance"><b style="color:red;font-weight:bold;">*</b>结余：</label>
                        <input type="number" class="form-control" id="bankBalance" placeholder="账户结余" name="BankBalance">
                    </div>
                    <br />
                    <div class="confirm">
                        <input type="reset" class="btn btn-danger supbtn" value="重置"  />
                        <input type="submit" class="btn btn-danger supbtn" value="确定"/>
                    </div>
                    <em>提示：添加账户成功后，请先完成对账。</em>
                </form>
            </div>
        </div>
        <!-- 添加账户end -->

        <!-- 结余调节start --->
        <div class="popup modify_pop_box">
            <div class="pop">
                <span class="colse_popbox close-popup">X</span>
                <h5>结余调节</h5>
                <form class="form-inline _mod" style="padding: 5px 5px 5px 30px;" action="post">
                    <div class="form-group" style="display: none">
                        <label for="BankID">标识：</label>
                        <input type="text" class="form-control" id="_bankID" placeholder="标识" name="BankID">
                    </div>
                    <div class="form-group">
                        <label for="BankName">开户银行：</label>
                        <input type="text" class="form-control" id="_bankName" placeholder="开户银行" name="BankName">
                    </div>
                    <div class="form-group">
                        <label for="BankAccount">银行账号：</label>
                        <input type="text" class="form-control" id="_bankAccount" placeholder="银行账号" name="BankAccount">
                    </div>
                    <div class="form-group">
                        <label for="Currency">币种：</label>
                        <select name="Currency" class="form-control" id="_currency">
                            <option value="">币种</option>
                            <option value="1" class="CurrentRMB">人民币</option>
                            <option value="2" class="CurrentUSD">美金</option>
                        </select>
                    </div>
                    <div class="form-group">
                        <label for="BankBalance">账户结余：</label>
                        <input type="number" class="form-control" id="_bankBalance" placeholder="账户结余" name="BankBalance">
                    </div>
                    <div class="remarks-group">
                        <label for="Comments">调节备注：</label>
                        <textarea class="form-text" id="_comments" placeholder="为什么调节结余？" name="Comments" cols="65"></textarea>
                    </div>
                    <div class="confirm">
                        <input type="button" class="btn btn-danger supbtn close-popup" value="取消" name="x"/>
                        <input type="submit" class="btn btn-danger supbtn" value="确定"/>
                    </div>
                    <em>提示：为防止误操作，【结余调节】默认设置结余对账“不符”，请确认结余无误后，再点击【相符】</em>
                </form>
            </div>
        </div>
        <!-- 结余调节end --->

        <!-- 换美金start -->
        <div class="popup exchange_pop_box">
            <div class="pop">
                <span class="colse_popbox close-popup">X</span>
                <h5>兑换美金</h5>
                <form class="form-inline _exchan _mod" style="padding: 5px 5px 5px 30px;" action="post">
                    <div class="form-group" style="display:none;">
                        <label for="ExBankID">账户ID：</label>
                        <input type="text" class="form-control" id="_exbankID" placeholder="账户ID" name="ExBankID" readonly="readonly">
                    </div>
                    <div class="form-group">
                        <label for="Amount"><b style="color:red;font-weight:bold;">*</b>已兑换美金：</label>
                        <input type="number" class="form-control" id="ex_Amount" placeholder="今天打了去HK的美金" name="Amount">
                    </div>
                    <div class="form-group">
                        <label for="Balance">当前结余：</label>
                        <input type="number" class="form-control" id="_balance" placeholder="结余" name="Balance" readonly="readonly">
                    </div>
                    <div class="form-group">
                        <label for="ExAmount"><b style="color:red;font-weight:bold;">*</b>实支出金额：</label>
                        <input type="number" class="form-control" id="ex_exAmount" placeholder="实际从账户支出的钱" name="ExAmount">
                    </div>
                    <div class="form-group">
                        <label for="BankID"><b style="color:red;font-weight:bold;">*</b>支出账户：</label>
                        <select id="mod_accountID" class="form-control list_search" name="BankID"></select>
                    </div>
                    <div class="form-group">
                        <label for="Exchange"><b style="color:red;font-weight:bold;">*</b>兑换汇率：</label>
                        <input type="number" class="form-control" id="ex_exchange" placeholder="当次换的汇率" name="Exchange" onblur="ComputeUsd();">
                    </div>
                    <div class="form-group">
                        <label for="Others"><b style="color:red;font-weight:bold;">*</b>关联人：</label>
                        <input type="text" class="form-control" id="ex_others" placeholder="人物" name="Others">
                    </div>
                    <div class="form-group">
                        <label for="ExBalance"><b style="color:red;font-weight:bold;">*</b>可兑换美金：</label>
                        <input type="number" class="form-control" id="ex_exBalance" placeholder="可兑换美金" name="ExBalance" readonly="readonly" style="color:red;">
                    </div>
                    <div class="form-group">
                        <label for="">应支出金额：</label>
                        <input type="number" class="form-control" id="_actualAmount" placeholder="应支出金额" name="Actual" readonly="readonly">
                    </div>
                    <div class="form-group">
                        <label for="ArrivalTime"><b style="color:red;font-weight:bold;">*</b>到账日期：</label>
                        <input type="text" class="form-control time_input" id="ex_arrivalTime" placeholder="到账日期" name="ArrivalTime" />
                    </div>
                    <div class="form-group">
                        <label for="CreateTime"><b style="color:red;font-weight:bold;">*</b>兑换日期：</label>
                        <input type="text" class="form-control time_input" id="ex_createTime" placeholder="兑换日期" name="CreateTime" />
                    </div>
                    <div class="remarks-group">
                        <label for="Comments">兑换备注：</label>
                        <textarea class="form-text" id="ex_remarks" placeholder="审核备注" name="Comments" cols="65"></textarea>
                    </div>
                    <div class="confirm">
                        <input type="reset" class="btn btn-danger supbtn" value="重置"/>
                        <input type="submit" class="btn btn-danger supbtn" value="确定"/>
                    </div>
                    <em>(1)可兑换美金 = 实支出金额 / 兑换汇率<br />(2) 支出账户对账必须相符和结余充足<br />(3) 收入账户对账必须相符 <br />(4) 兑换日期务必正确填写，否则将影响周采购汇率值的准确性</em>
                </form>
            </div>
        </div>
        <!-- 换美金end -->

        <!-- 转账到start -->
        <div class="popup transfer_pop_box">
            <div class="pop">
                <span class="colse_popbox close-popup">X</span>
                <h5>转账到</h5>
                <form class="form-inline _transfer" style="padding: 5px 5px 5px 30px;" action="post">
                    <div class="form-group" style="display:none;">
                        <label for="ExBankID">账户ID：</label>
                        <input type="text" class="form-control" id="_transferbankID" placeholder="账户ID" name="ExBankID" readonly="readonly">
                    </div>
                    <div class="form-group">
                        <label for="BankName">转出账户：</label>
                        <input type="text" class="form-control" id="_transferbankName" placeholder="转出账户" name="BankName" readonly="readonly">
                    </div>
                    <div class="form-group">
                        <label for="Balance">当前结余：</label>
                        <input type="number" class="form-control" id="transfer_balance" placeholder="结余" name="Balance" readonly="readonly">
                    </div>
                    <br />
                    <div class="form-group">
                        <label for="ExAmount"><b style="color:red;font-weight:bold;">*</b>转出金额：</label>
                        <input type="number" class="form-control" id="transfer_exAmount" placeholder="支出的钱(正整数)" name="ExAmount">
                    </div>
                    <div class="form-group">
                        <label for="BankID"><b style="color:red;font-weight:bold;">*</b>转入账户：</label>
                        <select id="transfer_accountID" class="form-control list_search" name="BankID"></select>
                    </div>
                    <div class="form-group">
                        <label for="ArrivalTime">到账日期：</label>
                        <div class="list-block" style="margin: 0; width: 70%;">
                            <ul>
                                <li>
                                    <div class="item-content" style="padding-left: 0;">
                                        <div class="item-inner">
                                            <div class="item-input">
                                                <input type="text" class="date_input time_input" name="ArrivalTime" placeholder="到账日期" readonly id="transfer_arrivalTime" required="required">
                                            </div>
                                        </div>
                                    </div>
                                </li>
                            </ul>
                        </div>
                    </div>
                    <div class="remarks-group">
                        <label for="Comments"><b style="color:red;font-weight:bold;">*</b>转出备注：</label>
                        <textarea class="form-text" id="transfer_remarks" placeholder="转出备注" name="Comments" cols="65"></textarea>
                    </div>
                    <div class="confirm">
                        <input type="reset" class="btn btn-danger supbtn" value="重置"/>
                        <input type="submit" class="btn btn-danger supbtn" value="确定"/>
                    </div>
                    <em>(1) 转出和转入账户不能为同一账户<br />(2)不支持人民币账户转美金账户<br />(3) 转出账户对账必须相符和结余充足<br />(4)转入账户对账必须相符 <br />(5)到账日期务必正确填写</em>
                </form>
            </div>
        </div>
        <!-- 转账到end -->

        <!-- 直接充值start -->
        <div class="popup rechange_pop_box">
            <div class="pop">
                <span class="colse_popbox close-popup">X</span>
                <h5>直接充值</h5>
                <form class="form-inline _rech" style="padding: 5px 5px 5px 30px;" action="post">
                    <div class="form-group" style="display:none;">
                        <label for="BankID">当前账户ID：</label>
                        <input type="text" class="form-control" id="re_bankID" placeholder="当前账户" name="BankID">
                    </div>
                    <div class="form-group">
                        <label for="BankName">当前账户：</label>
                        <input type="text" class="form-control" id="re_bankName" placeholder="当前账户" name="BankName" readonly="readonly">
                    </div>
                    <div class="form-group">
                        <label for="BankBalance">当前结余：</label>
                        <input type="number" class="form-control" id="re_bankBalance" placeholder="当前结余" name="BankBalance" readonly="readonly">
                    </div>
                    <div class="form-group">
                        <label for="Amount"><b style="color:red;">*</b>充值金额：</label>
                        <input type="number" class="form-control" id="re_amount" placeholder="充值金额" name="Amount">
                    </div>
                    <div class="form-group">
                        <label for="Purpose">用途：</label>
                        <select class="form-control" name="Purpose" id="re_purpose">
                            <option value="1">裸钻</option>
                            <option value="2">换美金</option>
                            <option value="3">杂项</option>
                            <option value="4">借款</option>
                            <option value="5">还款</option>
                        </select>
                    </div>
                    <div class="form-group">
                        <label for="Others">人物：</label>
                        <input class="form-control" id="re_others" placeholder="人物" name="Others"/>
                    </div>
                    <div class="remarks-group">
                        <label for="Comments"><b style="color:red;">*</b>备注：</label>
                        <textarea class="form-text" id="re_remarks" placeholder="审核备注" name="Comments" cols="65"></textarea>
                    </div>
                    <div class="confirm">
                        <input type="reset" class="btn btn-danger supbtn" value="重置"/>
                        <input type="submit" class="btn btn-danger supbtn" value="确定"/>
                    </div>
                </form>
            </div>
        </div>
        <!-- 直接充值end -->

        <!-- 弹出框end -->

    </div>
</div>
</body>
</html>
@Html.Partial("wap/team/commonTeamJs")
<script src="~/Js/jquery.validate.min.js"></script>
<script src="~/js/wap/team/bank.js?v=@MvcWechat.Common.Version.Get" type="text/javascript"></script>
